<div id="main">
	<div id="main_left" class="f_left">
		<div id="bread"><?php echo $bread_crumbs; ?></div>
		<form method="post">
		<div id="grid_list">
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr class="th">
					<td width="100">角色权限类别</td>
					<td width="600">权限行为列表</td>
				</tr>
				<?php foreach($behavior_list as $name => $list): ?>
				<tr>
					<td><input type="checkbox" class="all" /> <?php echo $name;?></td>
					<td>
						<?php foreach($list as $beha_name => $behavior):?>
							<input type="checkbox" name="behavior[]" <?php if(in_array($behavior, $actions)):?>checked="checked"<?php endif; ?> value="<?php echo $behavior;?>"> <?php echo $beha_name;?>　
						<?php endforeach ?>
					</td>
				</tr>
				<?php endforeach ?>
			</table>
			<input type="submit" value=" 修改角色权限 " class="martop10" />
		</div>
		</form>
		<script type="text/javascript">
		$('.all').click(function(){
			if($(this).is(':checked')) {
				$(this).parent().next().children('input').attr('checked','checked');
			} else {
				$(this).parent().next().children('input').removeAttr('checked');
			}
		})
		</script>
	</div>
	<div id="sidebar" class="f_left">
		{include file=block/sidebar_index}
	</div>
</div>